package com.fm.financemanage.util;


import com.fm.financemanage.model.po.SysUser;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.BeanUtils;

/** 获取后台管理员信息
 * @version V1.0
 * @author: zpc
 * @date:
 */
public class SysAdminUtils {

    public static SysUser getAdmin() {
        Object principal = SecurityUtils.getSubject().getPrincipal();
        SysUser adminUser = new SysUser();
        BeanUtils.copyProperties(principal, adminUser);
        return adminUser;
    }
}
